<template>
  <div>
    <el-button type="text" size="small" @click="handlePreview">预览</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  created() {
  },
  computed: {},
  mounted() {
  },
  methods: {
    handlePreview() {
      var pdfUrl = 'http://localhost:8019/pdf/Spring Cloud Alibaba 架构.pdf'
      window.open('/js/pdfjs-4.0.379/web/viewer.html?file=' + encodeURIComponent(pdfUrl))
    }
  }
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>